﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Manager_product_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>产品中心</title>
    <link href="../../Style/css/fontCss.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <ext:PageManager ID="PageManager1" runat="server"    />
    <ext:Panel ID="Panel1" runat="server" BodyPadding="5px" EnableLargeHeader="false"
        EnableBackgroundColor="true" ShowBorder="true" ShowHeader="true" Layout="Container"
        BoxConfigAlign="Top" AutoHeight="true" Title="产品中心">
        <Items>
            <ext:Form ID="Form2" runat="server" Height="36px" BodyPadding="5px" ShowHeader="false"
                ShowBorder="false" EnableBackgroundColor="true">
                <Rows>
                    <ext:FormRow ID="FormRow1" runat="server">
                        <Items>
                            <ext:TextBox ID="txtkeyword" MaxLength="20" EmptyText="关键字" runat="server" Label="产品名称"
                                Text="">
                            </ext:TextBox>
                            <ext:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click">
                            </ext:Button>
                        </Items>
                    </ext:FormRow>
                </Rows>
            </ext:Form>
            <ext:Grid ID="gridProduct" runat="server" EnableRowNumber="true" EnableCheckBoxSelect="false"
                Title="" AllowPaging="True" AutoHeight="True" ShowHeader="false" OnPageIndexChange="gridProduct_PageIndexChange"
                OnRowCommand="gridProduct_RowCommand" DataKeyNames="ID,PICUrl" 
                PageSize="10" EnableAjax="False" EnableAjaxLoading="False">
                <Toolbars>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="btnNew" Text="新增产品" Icon="Add" EnablePostBack="false" runat="server">
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </Toolbars>
                <Columns>
                    <ext:BoundField HeaderText="产品名称" ExpandUnusedSpace="true" DataField="TName" />
                    <ext:TemplateField HeaderText="所属分类" Width="200px">
                        <ItemTemplate>
                            <%#GetlmName(int.Parse(Eval("lmID").ToString()))%>
                        </ItemTemplate>
                    </ext:TemplateField>
                    <ext:CheckBoxField HeaderText="首页显示" RenderAsStaticField="true" Width="100px" DataField="IsHomePageShow" />
                    <ext:BoundField HeaderText="记录时间" Width="100px" DataFormatString="{0:d}" DataField="RecordDate" />
                   <ext:WindowField HeaderText="排序" Width="50px"  Title="修改排序" DataTextField="Taxis" DataIFrameUrlFormatString="Sort.aspx?ID={0}"
                        WindowID="Win_Sort" DataIFrameUrlFields="ID" />
                    <ext:WindowField HeaderText="编辑" Width="50px" Title="编辑" Text="编辑" DataIFrameUrlFormatString="Edit.aspx?ID={0}"
                        WindowID="Win_Edit" DataIFrameUrlFields="ID" />
                    <ext:LinkButtonField Width="50px" Text="删除" ConfirmText="确定删除？" HeaderText="删除" ConfirmTarget="Top"
                        CommandName="Delete" />
                </Columns>
            </ext:Grid>
        </Items>
    </ext:Panel>
    <ext:Window ID="Win_Edit" runat="server" Height="600px" IsModal="true" Hidden="true"
        Popup="false" Title="" Width="800px" EnableIFrame="true" OnClose="Win_Close"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" Target="Parent" IFrameUrl="about:blank">
    </ext:Window>
    <ext:Window ID="Win_Sort" runat="server" Height="200px" IsModal="true" Hidden="true"
        Popup="false" Title="" Width="300px" EnableIFrame="true" OnClose="Win_Close"
        CloseAction="HidePostBack" EnableConfirmOnClose="true" Target="Parent" IFrameUrl="about:blank">
    </ext:Window>
    </form>
</body>
</html>
